﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wicresoft.UnifyShow.Business.Models;

namespace Wicresoft.UnifyShow.Business
{
    public interface IDutyPlan
    {
        List<DutyPlanModel> GetDutyPlanByTime(DateTime start, DateTime end,decimal LocationID);
        DutyPlanModel GetDutyPlanByID(int id);
        int Add(DutyPlanModel model);
        void Delete(decimal id);
        bool DeleteByDutyDay(DateTime dutyDay, decimal LocationID);
        int Update(DutyPlanModel model);
        int AddList(IList<DutyPlanModel> models);
        int UpdateList(IList<DutyPlanModel> models);
        bool DeleteList(IList<DutyPlanModel> models);
        DutyPlanModel GetTodayDutyInfo(decimal LocationID);
        bool IsExist(DateTime dutyday,decimal LocationID);

        DutyPlanModel GetDutyPlanByDutyDay(DateTime dutyDay, decimal LocationID);
        /// <summary>
        /// 查询值班记录
        /// </summary>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <param name="LocationID"></param>
        /// <returns></returns>
        List<DutyLog> QueryDutyLog(DateTime startDate, DateTime endDate, decimal LocationID, out decimal totalCount, int page, int rows, string sort = "ID", string order = "Descending");

        /// <summary>
        /// 插入值班记录
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool InsertDutyLog(DutyLog model);

        /// <summary>
        /// 获取某一天的值班记录
        /// </summary>
        /// <param name="dutyDay"></param>
        /// <param name="LocationID"></param>
        /// <returns></returns>
        DutyLog GetDutyLogDutyDay(DateTime dutyDay, decimal LocationID);

        /// <summary>
        /// 根据ID获取值班记录
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        DutyLog GetDutyLogByID(decimal ID);
    }
}
